//
//  StatusCell.swift
//  SinaWeibo
//
//  Created by Apple on 15/11/14.
//  Copyright © 2015年 Apple. All rights reserved.
//

import UIKit
let StatusCellMargin: CGFloat = 12
let StatusCellIconWidth: CGFloat = 35
class StatusCell: UITableViewCell {
    //MARK: 3.重写父类的构造方法 调用设置UI
    var status: Status?{
        didSet {
            originalView.status = status
        }
    }
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        setupUI()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    //MARK:2.设置UI
    private func setupUI(){
        contentView.addSubview(originalView)
        originalView.snp_makeConstraints { (make) -> Void in
            make.top.equalTo(contentView.snp_top)
            make.left.equalTo(contentView.snp_left)
            make.right.equalTo(contentView.snp_right)
        }
        contentView.snp_makeConstraints { (make) -> Void in
            make.top.equalTo(self.snp_top)
            make.right.equalTo(self.snp_right)
            make.left.equalTo(self.snp_left)
            make.bottom.equalTo(originalView.snp_bottom)
        }
    }
    
    //MARK:1.懒加载控件
    
    private lazy var originalView: StatusOriginalView = StatusOriginalView()
}
